import React from 'react'

// 导入路由
import { BrowserRouter, Route, Redirect, Switch } from 'react-router-dom'

// 导入页面组件
import Home from '@/pages/Home'
import Login from '@/pages/Login'

// 配置路由
class App extends React.Component {
  render() {
    return (
      <BrowserRouter>
        <Switch>
          <Redirect exact from="/" to="/home"></Redirect>
          <Route path="/home" component={Home}></Route>
          <Route path="/login" component={Login}></Route>
        </Switch>
      </BrowserRouter>
    )
  }
}
// 渲染
export default App
